home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / win_utl1 / hb109sc.zip / SETUP.INF < prev    next >
Text File  |  1996-04-14  |  6KB  |  188 lines

  1. //
  2. // Setup Installation File
  3. // Created by Setup Builder Version 4.01.002
  4. //
  5. // Copyright ⌐ 1993 - 1996 G.Plowman
  6. //
  7. // Created: 14-04-1996 at 16:42:37
  8. //
  9.  
  10.  
  11.  
  12. // Application Variables
  13. SET %Caption%="Setup"
  14. SET %Application%="HelpBuilder SpellChecker"
  15. SET %InstallPath%="C:\HELPBLDR"
  16. SET %InstallDrive%="C:"
  17. SET %IniFile%="HBSC.INI"
  18. GetProfileString("Install", "Path", "%InstallPath%", "%IniFile%", %InstallPath%)
  19.  
  20.  
  21. // Language
  22. SetLanguage("UkEnglish")
  23.  
  24.  
  25. // Set up the backdrop text
  26. SetBackdropText(1, "|    %Application% Installation", 1, 1, 50, 255, 255, 255)
  27. SetBackdropText(2, "    Install/De-Install created using Setup Builder Version 4.01.002|    Copyright ⌐ 1993 - 1996 G.Plowman|", 0, 1, 17, 255, 255, 255)
  28.  
  29.  
  30. // Now display the appropriate backdrop
  31. GetScreenWidth(%Width%)
  32. IF %Width% == 640 ShowBackDrop("", 0, 0, 0)
  33. IF %Width% == 640 GOTO :DONEBACKDROP
  34. IF %Width% == 800 ShowBackDrop("", 0, 0, 0)
  35. IF %Width% == 800 GOTO :DONEBACKDROP
  36. IF %Width% == 1024 ShowBackDrop("", 0, 0, 0)
  37. IF %Width% == 1024 GOTO :DONEBACKDROP
  38.  
  39. // Display default backdrop if screen size not recognised
  40. ShowBackDrop("", 0, 0, 0)
  41. :DONEBACKDROP
  42.  
  43.  
  44. // User defined code - initialisation
  45. // See if HelpBuilder has been installed and stop if it hasn't
  46. GetProfileString("Install", "Path", "", "HELPBLDR.INI", %InstallPath%)
  47. IF "%InstallPath%" == "" GOTO :NOHB
  48.  
  49. // HelpBuilder is installed, but is it the right version ?
  50. GetProfileString("Install", "Version", "", "HELPBLDR.INI", %Version%)
  51. IF "%Version%" == "1.09.001" GOTO :CONT1
  52.  
  53. // HelpBuilder is not installed
  54. :NOHB
  55. MessageBox("Error: The correct version of HelpBuilder has not been installed.||You cannot install %Application% until HelpBuilder version 1.09 or greater has been installed!", "%Caption%", MB_OK, MB_ICONEXCLAMATION)
  56. GOTO :END
  57.  
  58. // Got HelpBuilder and it's >= version 1.09.001
  59. :CONT1
  60.  
  61.  
  62. // Welcome Dialog
  63. :BACK
  64. SET %Message1%="Welcome to the %Application% Installation Program."
  65. SET %Message2%="This program will install the %Application% software in your HelpBuilder directory on your hard disk."
  66. SET %Message3%="(Compuserve ID: 100105,536)||Setup is supplied with the Setup Builder|software and is the copyright of G.Plowman"
  67. DialogBox("Welcome")
  68. IF %ERROR% == IDCANCEL GOTO :EXIT
  69.  
  70.  
  71. // Create installation directory
  72. SET %MakeDir% = %InstallPath%
  73. SET %Temp%=Right(%MakeDir%, 1)
  74. IF "%Temp%" != "\" GOTO :DIROK
  75. SET %Temp% = Len(%MakeDir%) - 1
  76. SET %MakeDir% = Left(%MakeDir%, %Temp%)
  77.  
  78. :DIROK
  79. MkDir(%MakeDir%)
  80. Open("%MakeDir%\INSTALL.TST", 1, WRITE)
  81. IF %ERROR% == TRUE GOTO :DIRERROR
  82. Close(1)
  83. Delete("%MakeDir%\INSTALL.TST")
  84. SET %MakeDir% = ""
  85. SET %Temp% = ""
  86.  
  87.  
  88. // Check for space availability
  89. GetDiskSpace(%InstallDrive%)
  90. SET %Space% = %ERROR%
  91. IF %Space% >= 232448 GOTO :GOTSPACE
  92. MessageBox("The %Application% software requires 232448 bytes of disk space and there is only %Space% bytes free on your %InstallDrive% drive.||Do you wish to continue to install the software ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  93. IF %ERROR% == IDNO GOTO :EXIT
  94.  
  95.  
  96. :GOTSPACE
  97. // Save the installation directory
  98. WriteProfileString("Install", "Path", "%InstallPath%", "%IniFile%")
  99.  
  100.  
  101.  
  102.  
  103. // Make sure we have Disk #1 in the drive
  104. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  105. IF %ERROR% == IDCANCEL GOTO :EXIT
  106.  
  107.  
  108. // Copy files from disk & show in gauge
  109. CopyFile(7)
  110. "SPELLCHK.DLL", "%InstallPath%", "Copying: SpellChecker Dynamic Link Library", TRUE
  111. "SPELLCHK.HLP", "%InstallPath%", "Copying: SpellChecker Help File", TRUE
  112. "UK.DIC", "%InstallPath%", "Copying: UK English Dictionary", TRUE
  113. "LADMIN.EXE", "%InstallPath%", "Copying: License Administrator Utility", TRUE
  114. "ORDERAUS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  115. "ORDERUK.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  116. "COMMENTS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  117.  
  118.  
  119.  
  120.  
  121. // User defined code - post file copying
  122. // SpellChecker version
  123. WriteProfileString("Install", "Version", "1.00", "%IniFile%")
  124.  
  125. // Create some entries in HBSC.INI
  126. WriteProfileString("Dictionary", "Current", "%InstallPath%UK.DIC", "%IniFile%")
  127. WriteProfileString("Dictionary", "Dictionary0", "%InstallPath%UK.DIC", "%IniFile%")
  128.  
  129. // License
  130. GetProfileString("License", "Registration", "", "%IniFile%", %LStr%)
  131. IF "%LStr%" != "" GOTO :GOTIT
  132. GetLicense(%License%)
  133. WriteProfileString("License", "Registration", "%License%", "%IniFile%")
  134. :GOTIT
  135.  
  136.  
  137. // Now setup a new program manager group and its icons
  138. MakeGroup("HelpBuilder", "")
  139. MakeIcon("HelpBuilder SpellChecker Help", "%InstallPath%SPELLCHK.HLP ")
  140. MakeIcon("SpellChecker License Administrator", "%InstallPath%LADMIN.EXE HBSC.INI")
  141.  
  142.  
  143. // Licensing
  144. :LICENSING
  145. IF "%IniFile%" == "" SET %IniFile%="HelpBuilder SpellChecker.INI"
  146. SET %Message1% = "Please enter the following licensing information for the %Application% software:"
  147. DialogBox("License")
  148. IF %ERROR% == IDCANCEL GOTO :EXIT
  149.  
  150.  
  151. // Done
  152. :SUCCESS
  153. SET %Message1%="|%Application% installation has been successfully completed."
  154. SET %Message2%=""
  155. DialogBox("OkBox")
  156. GOTO :END
  157.  
  158.  
  159. // User decided to quit
  160. :EXIT
  161. SET %Message1%="Installation has been terminated. You should re-run this installation program at a later time to install %Application%."
  162. SET %Message2%="|The %Application% software has not been installed."
  163. DialogBox("OkBox")
  164. GOTO :END
  165.  
  166.  
  167. // Error
  168. :ERROR
  169. SET %Message1%="An error occured during installation of the %Application% software."
  170. SET %Message2%="|The %Application% software has not been fully installed."
  171. DialogBox("OkBox")
  172. GOTO :END
  173.  
  174.  
  175. // Failed to create install directory
  176. :DIRERROR
  177. SET %Message1% = "|Failed to create the installation directory '%MakeDir%'."
  178. SET %Message2% = "|Unable to install the %Application% software in the specified directory."
  179. DialogBox("OkBox")
  180. GOTO :END
  181.  
  182.  
  183. :END
  184. // Final tidy up - close files and remove components from H/D
  185. Close()
  186. CheckExists("%CurrentDirectory%CLEANUP.EXE", "Please insert the diskette labelled 'DISK01'")
  187. IF %ERROR% == IDOK WinExec("%CurrentDirectory%CLEANUP.EXE")
  188.